package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.Travel;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

// 游记持久化接口
public interface TravelRepository extends MongoRepository<Travel,String> {
    /**
     *  查某个目的地下游记点击量前3的文篇
     * @param destId
     * @param pageable
     * @return
     */
    List<Travel> findByDestId(String destId, Pageable pageable);

    /**
     * 通过目的地名称查询游记
     * @param destName
     * @return
     */
    List<Travel> findByDestName(String destName);
}
